home *** CD-ROM | disk | FTP | other *** search
/ Risc World 5 / Risc World 5.iso / SOFTWARE / Issue6 / VICE / VICE.ZIP / doc / vice_10 < prev    next >
Text File  |  2005-01-24  |  8KB  |  299 lines

  1. <HTML>
  2. <HEAD>
  3. <!-- This HTML file has been created by texi2html 1.52
  4.      from ../vice.texi on 23 January 2005 -->
  5.  
  6. <TITLE>VICE Manual - 10  c1541</TITLE>
  7. </HEAD>
  8. <BODY>
  9. Go to the <A HREF="vice_1.html">first</A>, <A HREF="vice_9.html">previous</A>, <A HREF="vice_11.html">next</A>, <A HREF="vice_16.html">last</A> section, <A HREF="vice_toc.html">table of contents</A>.
  10. <P><HR><P>
  11.  
  12.  
  13. <H1><A NAME="SEC147" HREF="vice_toc.html#TOC147">10  c1541</A></H1>
  14.  
  15. <P>
  16. VICE is provided with a complete stand-alone disk image maintenance
  17. utility, called <CODE>c1541</CODE>.
  18.  
  19. </P>
  20. <P>
  21. You can either invoke it from the command
  22. line or from within one of the VICE emulators, using the "Run c1541"
  23. command which will open a new <CODE>xterm</CODE> window with a running
  24. <CODE>c1541</CODE> in it.
  25.  
  26. </P>
  27. <P>
  28. The syntax is:
  29.  
  30. </P>
  31.  
  32. <PRE>
  33. c1541 [IMAGE1 [IMAGE2]] [COMMAND1 COMMAND2 ... COMMANDN]
  34. </PRE>
  35.  
  36. <P>
  37. <CODE>IMAGE1</CODE> and <CODE>IMAGE2</CODE> are disk image names that can be
  38. attached before <CODE>c1541</CODE> starts.  <CODE>c1541</CODE> can handle up to
  39. two disk images at the same time by using two virtual built-in drives,
  40. numbered <CODE>8</CODE> and <CODE>9</CODE>; <CODE>IMAGE1</CODE> (if present) is always
  41. attached to drive <CODE>8</CODE>, while <CODE>IMAGE2</CODE> is attached to drive
  42. <CODE>9</CODE>.
  43.  
  44. </P>
  45. <P>
  46. <CODE>COMMAND</CODE>s specified on the command-line all begin with the minus
  47. sign (<CODE>-</CODE>); if present, <CODE>c1541</CODE> executes them in the same
  48. order as they are on the command line and returns a zero error code if
  49. they were successful.  If any of the <CODE>COMMAND</CODE>s fails, <CODE>c1541</CODE>
  50. stops and returns a nonzero error code.
  51.  
  52. </P>
  53. <P>
  54. If no <CODE>COMMAND</CODE>s are specified at all, <CODE>c1541</CODE> enters
  55. interactive mode, where you can type commands manually.  Commands in
  56. interactive mode are the same as commands in batch mode, but do not
  57. require a leading <CODE>-</CODE>.  As with the monitor, file name completion
  58. and command line editing with history are provided via GNU
  59. <CODE>readline</CODE>.  Use the command <SAMP>`quit'</SAMP> or press <KBD>C-d</KBD> to
  60. exit.
  61.  
  62. </P>
  63.  
  64.  
  65.  
  66. <H2><A NAME="SEC148" HREF="vice_toc.html#TOC148">10.1  Specifying files in c1541</A></H2>
  67.  
  68. <P>
  69. When accessing CBM DOS files (i.e. files that reside on disk images),
  70. c1541 uses a special syntax that lets you access files on both drive 8
  71. and 9.  If you prepend the file name with <CODE>@8:</CODE> or <CODE>@9:</CODE>, you
  72. will specified that file is to be found or created on drive 8 and 9,
  73. respectively.
  74.  
  75. </P>
  76. <P>
  77. For instance,
  78.  
  79. </P>
  80.  
  81. <PRE>
  82. @8:somefile
  83. </PRE>
  84.  
  85. <P>
  86. will name file named <CODE>somefile</CODE> on unit 8, while
  87.  
  88. </P>
  89.  
  90. <PRE>
  91. @9:somefile
  92. </PRE>
  93.  
  94. <P>
  95. will name file named <CODE>somefile</CODE> on unit 9.
  96.  
  97. </P>
  98.  
  99.  
  100. <H2><A NAME="SEC149" HREF="vice_toc.html#TOC149">10.2  Using quotes and backslashes</A></H2>
  101.  
  102. <P>
  103. You can use quotes (<CODE>"</CODE>) in a command to embed spaces into file
  104. names.  For instance,
  105.  
  106. </P>
  107.  
  108. <PRE>
  109. read some file
  110. </PRE>
  111.  
  112. <P>
  113. will read file <CODE>some</CODE> from the disk image and write it into the
  114. file system as <CODE>file</CODE>, while
  115.  
  116. </P>
  117.  
  118. <PRE>
  119. read "some file"
  120. </PRE>
  121.  
  122. <P>
  123. will copy <CODE>some file</CODE> into the file system, with the name
  124. <CODE>some file</CODE>.
  125.  
  126. </P>
  127. <P>
  128. The backslash character (<CODE>\</CODE>) has a special meaning too: it lets
  129. you literally insert the following character no matter what it is.  For
  130. example,
  131.  
  132. </P>
  133.  
  134. <PRE>
  135. read some\ file
  136. </PRE>
  137.  
  138. <P>
  139. will copy file <CODE>some file</CODE> into the file system, while
  140.  
  141. </P>
  142.  
  143. <PRE>
  144. read some\ file this\"file
  145. </PRE>
  146.  
  147. <P>
  148. will copy <CODE>some file</CODE> into the file system with name
  149. <CODE>this"file</CODE> (with an embedded quote).
  150.  
  151. </P>
  152.  
  153.  
  154.  
  155. <H2><A NAME="SEC150" HREF="vice_toc.html#TOC150">10.3  c1541 commands and options</A></H2>
  156.  
  157. <P>
  158. This is a list of the <CODE>c1541</CODE> commands.  They are shown in their
  159. interactive form, without the leading <CODE>-</CODE>.
  160. Square brackets [] indicate an optional part, and "<COMMAND>" translates
  161. to a disk command according to CBM DOS, like "i0" for example.
  162.  
  163. </P>
  164. <DL COMPACT>
  165.  
  166. <DT><CODE>[<command>]</CODE>
  167. <DD>
  168. Execute specified CBM DOS command and print the current status of the
  169. drive.  If no <CODE>command</CODE> is specified, just print the status.
  170.  
  171. <DT><CODE>? [<command>]</CODE>
  172. <DD>
  173. Explain specified command.  If no command is specified, list available
  174. ones.
  175.  
  176. <DT><CODE>attach <diskimage> [<unit>]</CODE>
  177. <DD>
  178. Attach <CODE>diskimage</CODE> to <CODE>unit</CODE> (default unit is 8).
  179.  
  180. <DT><CODE>block <track> <sector> <disp> [<drive>]</CODE>
  181. <DD>
  182. Show specified disk block in hex form.
  183.  
  184. <DT><CODE>copy <source1> [<source2> ... <sourceN>] <destination></CODE>
  185. <DD>
  186. Copy <CODE>source1</CODE> ... <CODE>sourceN</CODE> into destination.  If N > 1,
  187. <CODE>destination</CODE> must be a simple drive specifier (<CODE>@n:</CODE>).
  188.  
  189. <DT><CODE>delete <file1> [<file2> ... <fileN>]</CODE>
  190. <DD>
  191. Delete the specified files.
  192.  
  193. <DT><CODE>exit</CODE>
  194. <DD>
  195. Exit (same as <CODE>quit</CODE>).
  196.  
  197. <DT><CODE>extract</CODE>
  198. <DD>
  199. Extract all the files to the file system.
  200.  
  201. <DT><CODE>format <diskname,id> [<type> <imagename>] [<unit>]</CODE>
  202. <DD>
  203. If <CODE>unit</CODE> is specified, format the disk in unit <CODE>unit</CODE>.  If
  204. <CODE>type</CODE> and <CODE>imagename</CODE> are specified, create a new image named
  205. <CODE>imagename</CODE>, attach it to unit 8 and format it.  <CODE>type</CODE> is a
  206. disk image type, and must be either <CODE>x64</CODE>, <CODE>d64</CODE> (both VC1541/2031), 
  207. <CODE>g64</CODE> (VC1541/2031 but in GCR coding), <CODE>d71</CODE> (VC1571), <CODE>d81</CODE>
  208. (VC1581), <CODE>d80</CODE> (CBM8050) or <CODE>d82</CODE> (CBM8250/1001). 
  209. Otherwise, format the disk in the current unit, if any.
  210.  
  211. <DT><CODE>gcrformat <diskname,id> <imagename></CODE>
  212. <DD>
  213. Create and format a G64 disk image named <CODE>imagename</CODE>.
  214.  
  215. <DT><CODE>help [<command>]</CODE>
  216. <DD>
  217. Explain specified command.  If no command is specified, list available
  218. ones.
  219.  
  220. <DT><CODE>info [<unit>]</CODE>
  221. <DD>
  222. Display information about unit <CODE>unit</CODE> (if unspecified, use the current
  223. one).
  224.  
  225. <DT><CODE>list [<pattern>]</CODE>
  226. <DD>
  227. List files matching <CODE>pattern</CODE> (default is all files).
  228.  
  229. <DT><CODE>quit</CODE>
  230. <DD>
  231. Exit (same as <CODE>exit</CODE>).
  232.  
  233. <DT><CODE>read <source> [<destination>]</CODE>
  234. <DD>
  235. Read <CODE>source</CODE> from the disk image and copy it into <CODE>destination</CODE> in
  236. the file system.  If <CODE>destination</CODE> is not specified, copy it into a
  237. file with the same name as <CODE>source</CODE>.", 
  238.  
  239. <DT><CODE>rename <oldname> <newname></CODE>
  240. <DD>
  241. Rename <CODE>oldname</CODE> into <CODE>newname</CODE>.  The files must be on the
  242. same drive.
  243.  
  244. <DT><CODE>tape <t64name> [<file1> ... <fileN>]</CODE>
  245. <DD>
  246. Extract files from a T64 image.
  247.  
  248. <DT><CODE>unit <number></CODE>
  249. <DD>
  250. Make unit <CODE>number</CODE> the current unit.
  251.  
  252. <DT><CODE>unlynx <lynxname> [<unit>]</CODE>
  253. <DD>
  254. Extract the specified Lynx image file into the specified unit (default
  255. is the current unit).
  256.  
  257. <DT><CODE>validate [<unit>]</CODE>
  258. <DD>
  259. Validate the disk in unit <CODE>unit</CODE>.  If <CODE>unit</CODE> is not specified,
  260. validate the disk in the current unit.
  261.  
  262. <DT><CODE>write <source> [<destination>]</CODE>
  263. <DD>
  264. Write <CODE>source</CODE> from the file system into <CODE>destination</CODE> on a
  265. disk image.
  266.  
  267. <DT><CODE>zcreate <x64name> <zipname> [<label,id>]</CODE>
  268. <DD>
  269. Create an X64 disk image out of a set of four Zipcoded files named
  270. <CODE>1!zipname</CODE>, <CODE>2!zipname</CODE>, <CODE>3!zipname</CODE> and
  271. <CODE>4!zipname</CODE>.
  272.  
  273. </DL>
  274.  
  275.  
  276.  
  277. <H2><A NAME="SEC151" HREF="vice_toc.html#TOC151">10.4  Executing shell commands</A></H2>
  278.  
  279. <P>
  280. If you want to execute a shell command from withing <CODE>c1541</CODE>, just
  281. prepend it with an exclamation mark (<CODE>!</CODE>).  For example,
  282.  
  283. </P>
  284.  
  285. <PRE>
  286. !ls -la
  287. </PRE>
  288.  
  289. <P>
  290. will execute the command <CODE>ls -la</CODE>, which will show you all the
  291. files in the current directory.
  292.  
  293. </P>
  294.  
  295. <P><HR><P>
  296. Go to the <A HREF="vice_1.html">first</A>, <A HREF="vice_9.html">previous</A>, <A HREF="vice_11.html">next</A>, <A HREF="vice_16.html">last</A> section, <A HREF="vice_toc.html">table of contents</A>.
  297. </BODY>
  298. </HTML>
  299.